<li class="sf_admin_batch_actions_choice">
  <script type="text/javascript">
    function setLugares() {
      if ($('#batch_action').val() == 'batchPlaceLibros') {
        $('#lugarCode').show();
      }
      else {
        $('#lugarCode').hide();
      }
    };

    $(function() {
      setLugares();
      $('#batch_action').change(setLugares);
    });
  </script>

  <select id="batch_action" name="batch_action">
    <option value=""><?php echo __('Choose an action', array(), 'sf_admin') ?></option>
    <option value="batchDelete"><?php echo __('Delete', array(), 'sf_admin') ?></option>
    <option value="batchPlaceLibros"><?php echo __('Colocar libros', array(), 'sf_admin') ?></option>
  </select>
  <select id="lugarCode" name="lugarCode">
        <option value=""><?php echo __('Seleccione un lugar'); ?></option>
  <?php foreach($lugares as $lugar): ?>
        <option value="<?php echo $lugar->getId(); ?>"><?php echo $lugar->getNombre(); ?></option>
  <?php endforeach; ?>
  </select>

  <?php $form = new sfForm(); if ($form->isCSRFProtected()): ?>
    <input type="hidden" name="<?php echo $form->getCSRFFieldName() ?>" value="<?php echo $form->getCSRFToken() ?>" />
  <?php endif; ?>
  <input type="submit" value="<?php echo __('go', array(), 'sf_admin') ?>" />
</li>
